*** Replication Codes for "Intrastate Armed Conflict Termination and Foreign Direct Investment" (Daehee Bak and Hoon Lee) ***


****************************************
log using "FPA_replication_log", replace
****************************************







use fdifinal_regression, clear

global c1 = "lngdppcPWT lnpopPWT growthPWT tradePWT kaopen resource cumbit_ratify preconflictfdi politydem lnbanks lnduration intensity"

/*
gen dv1 = lnfdiUNt1 
gen dv2 = lnfdiUNt12
gen dv3 = lnfdiUNt123
gen dv4 = lnfdiUNt1234
gen dv5 = lnfdiUNt12345

gen dv1_2 = ln2fdiUNt1 
gen dv2_2 = ln2fdiUNt12
gen dv3_2 = ln2fdiUNt123
*/




*** Table 1 ***
*** Table 1 ***
*** Table 1 ***

xtscc dv1 terminate $c1, fe
outreg2 using table1, word excel addstat(R-squared, `e(r2_w)') label dec(3) replace 
xtscc dv2 terminate $c1, fe
outreg2 using table1, word excel addstat(R-squared, `e(r2_w)') label dec(3) 
xtscc dv3 terminate $c1, fe
outreg2 using table1, word excel addstat(R-squared, `e(r2_w)') label dec(3)
xtscc dv1 victory peace cease low $c1, fe
outreg2 using table1, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv2 victory peace cease low $c1, fe
outreg2 using table1, word excel addstat(R-squared, `e(r2_w)') label dec(3) 
xtscc dv3 victory peace cease low $c1, fe
outreg2 using table1, word excel addstat(R-squared, `e(r2_w)') label dec(3)



*** Table 2 ***
*** Table 2 ***
*** Table 2 ***

xtscc dv1 victgovt victrebel peace cease low $c1, fe
outreg2 using table2, word excel addstat(R-squared, `e(r2_w)') label dec(3) replace  
xtscc dv2 victgovt victrebel peace cease low $c1, fe
outreg2 using table2, word excel addstat(R-squared, `e(r2_w)') label dec(3) 
xtscc dv3 victgovt victrebel peace cease low $c1, fe
outreg2 using table2, word excel addstat(R-squared, `e(r2_w)') label dec(3)



*** Table 3 ***
*** Table 3 ***
*** Table 3 ***

xtscc dv1 victory peace3rd peaceno3rd cease low $c1, fe
outreg2 using table3, word excel addstat(R-squared, `e(r2_w)') label dec(3) replace 
xtscc dv2 victory peace3rd peaceno3rd cease low $c1, fe
outreg2 using table3, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv3 victory peace3rd peaceno3rd cease low $c1, fe
outreg2 using table3, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv1 victory peace3rd_major peace3rd_io peaceno3rd cease low $c1, fe
outreg2 using table3, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv2 victory peace3rd_major peace3rd_io peaceno3rd cease low $c1, fe
outreg2 using table3, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv3 victory peace3rd_major peace3rd_io peaceno3rd cease low $c1, fe
outreg2 using table3, word excel addstat(R-squared, `e(r2_w)') label dec(3)  





****************
*** Figure 1 ***
*** Figure 1 ***
*** Figure 1 ***
****************

/* (1) Termination */
use fdifinal_regression, clear
forvalues i = 1/5 {
	xtscc dv`i' terminate $c1, fe 
	estimates store terminate`i'
	quietly margins, dydx(terminate) 
	mat bterminate`i' = r(table)
	mat bterminate`i' = (bterminate`i'[1,1],bterminate`i'[5,1],bterminate`i'[6,1])
	}
mat terminate = (bterminate1\bterminate2\bterminate3\bterminate4\bterminate5)
xsvmat terminate, saving(terminate,replace) 

use terminate, clear
gen id = _n
eclplot terminate1 terminate2 terminate3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Termination", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(terminate, replace) 
	

/* (2) Victory */
use fdifinal_regression, clear
forvalues i = 1/5 {
	xtscc dv`i' victory peace cease low $c1, fe 
	estimates store victory`i'
	quietly margins, dydx(victory) 
	mat bvictory`i' = r(table)
	mat bvictory`i' = (bvictory`i'[1,1],bvictory`i'[5,1],bvictory`i'[6,1])
	quietly margins, dydx(peace) 
	mat bpeace`i' = r(table)
	mat bpeace`i' = (bpeace`i'[1,1],bpeace`i'[5,1],bpeace`i'[6,1])	
	quietly margins, dydx(cease) 
	mat bcease`i' = r(table)
	mat bcease`i' = (bcease`i'[1,1],bcease`i'[5,1],bcease`i'[6,1])	
	quietly margins, dydx(low) 
	mat blow`i' = r(table)
	mat blow`i' = (blow`i'[1,1],blow`i'[5,1],blow`i'[6,1])		
	}
mat victory = (bvictory1\bvictory2\bvictory3\bvictory4\bvictory5)
xsvmat victory, saving(victory,replace) 
mat peace = (bpeace1\bpeace2\bpeace3\bpeace4\bpeace5)
xsvmat peace, saving(peace,replace) 
mat cease = (bcease1\bcease2\bcease3\bcease4\bcease5)
xsvmat cease, saving(cease,replace) 
mat low = (blow1\blow2\blow3\blow4\blow5)
xsvmat low, saving(low,replace) 

use victory, clear
gen id = _n
eclplot victory1 victory2 victory3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("One Side's Victory", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(victory, replace) 

use peace, clear
gen id = _n
eclplot peace1 peace2 peace3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Peace Agreement", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(peace, replace) 

use cease, clear
gen id = _n
eclplot cease1 cease2 cease3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Ceasefire", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(cease, replace) 

use low, clear
gen id = _n
eclplot low1 low2 low3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Low Activity", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(low, replace) 
	
/* (3) Govt. Victory */
use fdifinal_regression, clear
forvalues i = 1/5 {
	xtscc dv`i' victgovt victrebel peace cease low $c1, fe 
	estimates store victgovt`i'
	quietly margins, dydx(victgovt) 
	mat bvictgovt`i' = r(table)
	mat bvictgovt`i' = (bvictgovt`i'[1,1],bvictgovt`i'[5,1],bvictgovt`i'[6,1])
	quietly margins, dydx(victrebel) 
	mat bvictrebel`i' = r(table)
	mat bvictrebel`i' = (bvictrebel`i'[1,1],bvictrebel`i'[5,1],bvictrebel`i'[6,1])	
	quietly margins, dydx(peace) 
	mat bpeace`i' = r(table)
	mat bpeace`i' = (bpeace`i'[1,1],bpeace`i'[5,1],bpeace`i'[6,1])	
	quietly margins, dydx(cease) 
	mat bcease`i' = r(table)
	mat bcease`i' = (bcease`i'[1,1],bcease`i'[5,1],bcease`i'[6,1])	
	quietly margins, dydx(low) 
	mat blow`i' = r(table)
	mat blow`i' = (blow`i'[1,1],blow`i'[5,1],blow`i'[6,1])		
	}
mat victgovt = (bvictgovt1\bvictgovt2\bvictgovt3\bvictgovt4\bvictgovt5)
xsvmat victgovt, saving(victgovt,replace) 
mat victrebel = (bvictrebel1\bvictrebel2\bvictrebel3\bvictrebel4\bvictrebel5)
xsvmat victrebel, saving(victrebel,replace) 
mat peace = (bpeace1\bpeace2\bpeace3\bpeace4\bpeace5)
xsvmat peace, saving(peace,replace) 
mat cease = (bcease1\bcease2\bcease3\bcease4\bcease5)
xsvmat cease, saving(cease,replace) 
mat low = (blow1\blow2\blow3\blow4\blow5)
xsvmat low, saving(low,replace) 

use victgovt, clear
gen id = _n
eclplot victgovt1 victgovt2 victgovt3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Government Victory", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(victgovt, replace) 

use victrebel, clear
gen id = _n
eclplot victrebel1 victrebel2 victrebel3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Rebel Victory", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(victrebel, replace) 
	
/* (4) 3rd Peace Agreement */

use fdifinal_regression, clear
forvalues i = 1/5 {
	xtscc dv`i' victory peace3rd peaceno3rd cease low $c1, fe 
	estimates store peace3rd`i'
	quietly margins, dydx(victory) 
	mat bvictory`i' = r(table)
	mat bvictory`i' = (bvictory`i'[1,1],bvictory`i'[5,1],bvictory`i'[6,1])
	quietly margins, dydx(peace3rd) 
	mat bpeace3rd`i' = r(table)
	mat bpeace3rd`i' = (bpeace3rd`i'[1,1],bpeace3rd`i'[5,1],bpeace3rd`i'[6,1])
	mat bpeaceno3rd`i' = r(table)
	mat bpeaceno3rd`i' = (bpeaceno3rd`i'[1,1],bpeaceno3rd`i'[5,1],bpeaceno3rd`i'[6,1])	
	quietly margins, dydx(cease) 
	mat bcease`i' = r(table)
	mat bcease`i' = (bcease`i'[1,1],bcease`i'[5,1],bcease`i'[6,1])	
	quietly margins, dydx(low) 
	mat blow`i' = r(table)
	mat blow`i' = (blow`i'[1,1],blow`i'[5,1],blow`i'[6,1])		
	}
mat victory = (bvictory1\bvictory2\bvictory3\bvictory4\bvictory5)
xsvmat victory, saving(3rd_victory,replace) 
mat peace3rd = (bpeace3rd1\bpeace3rd2\bpeace3rd3\bpeace3rd4\bpeace3rd5)
xsvmat peace3rd, saving(3rd_peace3rd,replace) 
mat peaceno3rd = (bpeaceno3rd1\bpeaceno3rd2\bpeaceno3rd3\bpeaceno3rd4\bpeaceno3rd5)
xsvmat peaceno3rd, saving(3rd_peaceno3rd,replace) 
mat cease = (bcease1\bcease2\bcease3\bcease4\bcease5)
xsvmat cease, saving(3rd_cease,replace) 
mat low = (blow1\blow2\blow3\blow4\blow5)
xsvmat low, saving(3rd_low,replace) 


/* (5) 3rd Peace Agreement - Major Power */
use 3rd_peace3rd, clear
gen id = _n
eclplot peace3rd1 peace3rd2 peace3rd3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Peace Agreement (3rd Party)", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(3rd_peace3rd, replace) 

	
use fdifinal_regression, clear
forvalues i = 1/5 {
	xtscc dv`i' victory peace3rd_major peace3rd_io peaceno3rd cease low $c1, fe 
	estimates store peace3rd`i'
	quietly margins, dydx(victory) 
	mat bvictory`i' = r(table)
	mat bvictory`i' = (bvictory`i'[1,1],bvictory`i'[5,1],bvictory`i'[6,1])
	quietly margins, dydx(peace3rd_major) 
	mat bpeace3rd_major`i' = r(table)
	mat bpeace3rd_major`i' = (bpeace3rd_major`i'[1,1],bpeace3rd_major`i'[5,1],bpeace3rd_major`i'[6,1])
	quietly margins, dydx(peace3rd_io) 
	mat bpeace3rd_io`i' = r(table)
	mat bpeace3rd_io`i' = (bpeace3rd_io`i'[1,1],bpeace3rd_io`i'[5,1],bpeace3rd_io`i'[6,1])
	quietly margins, dydx(peaceno3rd) 
	mat bpeaceno3rd`i' = r(table)
	mat bpeaceno3rd`i' = (bpeaceno3rd`i'[1,1],bpeaceno3rd`i'[5,1],bpeaceno3rd`i'[6,1])	
	quietly margins, dydx(cease) 
	mat bcease`i' = r(table)
	mat bcease`i' = (bcease`i'[1,1],bcease`i'[5,1],bcease`i'[6,1])	
	quietly margins, dydx(low) 
	mat blow`i' = r(table)
	mat blow`i' = (blow`i'[1,1],blow`i'[5,1],blow`i'[6,1])		
	}
mat victory = (bvictory1\bvictory2\bvictory3\bvictory4\bvictory5)
xsvmat victory, saving(3rd_victory,replace) 
mat peace3rd_major = (bpeace3rd_major1\bpeace3rd_major2\bpeace3rd_major3\bpeace3rd_major4\bpeace3rd_major5)
xsvmat peace3rd_major, saving(3rd_peace3rd_major,replace) 
mat peace3rd_io = (bpeace3rd_io1\bpeace3rd_io2\bpeace3rd_io3\bpeace3rd_io4\bpeace3rd_io5)
xsvmat peace3rd_io, saving(3rd_peace3rd_io,replace) 
mat peaceno3rd = (bpeaceno3rd1\bpeaceno3rd2\bpeaceno3rd3\bpeaceno3rd4\bpeaceno3rd5)
xsvmat peaceno3rd, saving(3rd_peaceno3rd,replace) 
mat cease = (bcease1\bcease2\bcease3\bcease4\bcease5)
xsvmat cease, saving(3rd_cease,replace) 
mat low = (blow1\blow2\blow3\blow4\blow5)
xsvmat low, saving(3rd_low,replace) 

use 3rd_peace3rd_major, clear
gen id = _n
eclplot peace3rd_major1 peace3rd_major2 peace3rd_major3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Peace Agreement (major power)", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(3rd_peace3rd_major, replace) 

use 3rd_peace3rd_io, clear
gen id = _n
eclplot peace3rd_io1 peace3rd_io2 peace3rd_io3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Peace Agreement (IO)", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(3rd_peace3rd_io, replace) 
	
use 3rd_peaceno3rd, clear
gen id = _n
eclplot peaceno3rd1 peaceno3rd2 peaceno3rd3 id, ///
	xscale(range(0 6)) ciopts(blcolor(black)) estopts(color(black)) ///
	plotregion(fcolor(white)) graphregion(fcolor(white)) ///
	ytitle("", size(4)) title("Peace Agreement (no 3rd party)", size(4)) yline(0, lpattern(dash)) scheme(s1mono)  ///
	xlabel(1 "t+1"  2 "t+1~2" 3 "t+1~3" 4 "t+1~4" 5 "t+1~5", labsize(3)) ylabel(, labsize(3)) xtitle("") saving(3rd_peaceno3rd, replace) 

	
graph combine terminate.gph victory.gph victgovt.gph victrebel.gph 3rd_peace3rd.gph 3rd_peace3rd_major.gph 3rd_peace3rd_io.gph 3rd_peaceno3rd.gph cease.gph low.gph, ///
	col(2) row(5) saving(marginal1, replace)

graph export marginal1.tif, width(4000) replace	












*** Table A2 ***	
*** Table A2 ***	
*** Table A2 ***	

use fdifinal_regression, clear

keep if censor==0

global c1_high = "lngdppcPWT lnpopPWT growthPWT tradePWT kaopen resource cumbit_ratify preconflictfdi politydem lnbanks lnduration cumint"

xtscc dv1 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1_high, fe
outreg2 using tableA2, replace word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv2 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1_high, fe
outreg2 using tableA2, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv3 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1_high, fe
outreg2 using tableA2, word excel addstat(R-squared, `e(r2_w)') label dec(3)  




*** Table A3 ***	
*** Table A3 ***	
*** Table A3 ***	

use fdifinal_regression, clear

xi i.ccode i.year
global year = "_Iyear*"

global c1 = "lngdppcPWT lnpopPWT growthPWT tradePWT kaopen resource cumbit_ratify preconflictfdi politydem lnbanks lnduration cumint"

xtscc dv1 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1 $year, fe
outreg2 using tableA3, replace word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv2 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1 $year, fe
outreg2 using tableA3, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv3 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1 $year, fe
outreg2 using tableA3, word excel addstat(R-squared, `e(r2_w)') label dec(3)  




*** Table A4 ***	
*** Table A4 ***	
*** Table A4 ***	

use fdifinal_regression, clear

xi i.ccode i.year
global year = "_Iyear*"


global c1 = "lngdppcPWT lnpopPWT growthPWT tradePWT kaopen resource cumbit_ratify preconflictfdi politydem lnbanks lnduration cumint"

xtscc dv1_2 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1 $year, fe
outreg2 using tableA4, replace word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv2_2 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1 $year, fe
outreg2 using tableA4, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv3_2 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1 $year, fe
outreg2 using tableA4, word excel addstat(R-squared, `e(r2_w)') label dec(3)  



*** Table A5 ***	
*** Table A5 ***	
*** Table A5 ***	

use kreutzpr, clear

global c3 = "lngdppcPWT lnpopPWT growthPWT tradePWT kaopen resource cumbit_ratify polity2 lnbanks"

xtscc lnfdiUNt0 xb $c3, fe
outreg2 using tableA5, replace word excel addstat(R-squared, `e(r2_w)') label dec(3) 
xtscc lnfdiUN_lead1 xb $c3, fe
outreg2 using tableA5, word excel addstat(R-squared, `e(r2_w)') label dec(3) 
xtscc lnfdiUN_lead2 xb $c3, fe
outreg2 using tableA5, word excel addstat(R-squared, `e(r2_w)') label dec(3) 
xtscc lnfdiUN_lead3 xb $c3, fe
outreg2 using tableA5, word excel addstat(R-squared, `e(r2_w)') label dec(3) 



*** Table A6 ***	
*** Table A6 ***	
*** Table A6 ***	

use fdifinal_regression, clear

global c_ondd = "lngdppcPWT lnpopPWT growthPWT tradePWT kaopen resource cumbit_ratify polity2 lnbanks lnduration intensity"
 
xtscc war_ONDD victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c_ondd, fe
outreg2 using tableA6, word excel replace addstat(R-squared, `e(r2_w)') label dec(3)  




*** Table A7 ***	
*** Table A7 ***	
*** Table A7 ***	

use fdifinal_regression, clear
global c1 = "lngdppcPWT lnpopPWT growthPWT tradePWT kaopen resource cumbit_ratify politydem lnbanks lnduration intensity"

xtscc dv1 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1 fullpeace lnfdiUNt0, fe
outreg2 using tableA7, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv2 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1 fullpeace lnfdiUNt0, fe
outreg2 using tableA7, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv3 victgovt victrebel peace3rd_major peace3rd_io peaceno3rd cease low $c1 fullpeace lnfdiUNt0, fe
outreg2 using tableA7, word excel addstat(R-squared, `e(r2_w)') label dec(3)  



*** Table A8 ***	
*** Table A8 ***	
*** Table A8 ***	

use fdifinal_regression, clear
global c1 = "lngdppcPWT lnpopPWT growthPWT tradePWT kaopen resource cumbit_ratify preconflictfdi politydem lnbanks lnduration intensity"

xtscc dv1 victgovt victrebel peace3rd peaceno3rd cease low $c1 if year>1989, fe
outreg2 using tableA8, word excel addstat(R-squared, `e(r2_w)') label dec(3) replace 
xtscc dv2 victgovt victrebel peace3rd peaceno3rd cease low $c1 if year>1989, fe
outreg2 using tableA8, word excel addstat(R-squared, `e(r2_w)') label dec(3)  
xtscc dv3 victgovt victrebel peace3rd peaceno3rd cease low $c1  if year>1989, fe
outreg2 using tableA8, word excel addstat(R-squared, `e(r2_w)') label dec(3)  



*************
log close
*************
